<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="layout/template.xhtml">

<ui:define name="body">
	
	<table align="right">
		<tr>
			<td>
				<h:commandButton immediate="true"
					onclick="abrirPopup('help_online/help_servico.seam');" 
					title="Ajuda Online"
					alt="Ajuda Online"
					image="img/help_peq.jpg"/>
			</td>
		</tr>
	</table>
	
	<h2 class="title"><a href="#">Gerenciar Serviços</a></h2><br/>
	
	    <h:form id="servicoForm">
			
	        <h:panelGrid columnClasses="2">
				<s:decorate template="/layout/edit.xhtml">
					<ui:define name="label">Nome</ui:define>
					<h:inputText value="#{manterServicoController.servicoEdicao.dscNome}"
						onkeydown="Mascara(this,Maiusculo)"
						onkeyup="Mascara(this,Maiusculo)"
						maxlength="200"
						style="width: 300px;"
						required="true"/>
				</s:decorate>	        
				
				<s:decorate template="/layout/edit.xhtml">
					<ui:define name="label">Valor</ui:define>
					<h:inputText value="#{manterServicoController.servicoEdicao.vlrServico}"
						maxlength="50"
						required="true"
						onkeydown="Mascara(this,Valor)"
						onkeyup="Mascara(this,Valor)"
						converter="conversorMonetario"/>
				</s:decorate>	        
	        </h:panelGrid>
	        
	        <div class="actionButtons">
	            <h:commandButton id="submit" value="Salvar" action="#{manterServicoController.salvar}"
	            	onclick="javascript:if(!confirm('Tem certeza que deseja salvar?'))return false;"/>
	            <h:commandButton id="cancel" 
	            	value="Cancelar"
	            	action="#{manterServicoController.cancelar()}"
	            	immediate="true"/>
	        </div>
	    </h:form>

 </ui:define>
</ui:composition>
